<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/include.inc.jsp"%>
<h2 class="contentTitle">增加理论科目信息</h2>
<script type="text/javascript" >
function add(){
	var a=$("#tm1score").val();
	var b=$("#tm2score").val();
	var c=0;
	if(a){
		a=parseInt(a);
		if(b){
			b=parseInt(b);
			c=a+b;
		}else{
			c=a;
		}
	}else{
		if(b){
			b=parseInt(b);
			c=b;
		}else{
			c=0;
		}
	}
	$("#tkscore").val(c);
}
</script> 
<form action="<c:url value='tkcurd.do?method=addsave&bz=1'/>" method="post" class='required-validate pageForm' onsubmit="return iframeCallback(this, navTabAjaxDone);">

<div class="pageFormContent" >
	<div class="unit">
		<label>科目名称</label>
		<input type="text" name="title" value="${tk.title}" class="textInput required" maxlength="200" size="100"/>
	</div>
	<div class="unit">
		<label>单选题分数</label>
		<input type="text" id="tm1score" name="tm1score" placeholder="输入整数" onchange="add()" value="${tk.tm1score eq null ? 0 : tk.tm1score}" class="textInput required digits" maxlength="200" size="100"/>
	</div>
	<div class="unit">
		<label>多选题分数</label>
		<input type="text" id="tm2score" name="tm2score" placeholder="输入整数" onchange="add()" value="${tk.tm2score eq null ? 0 : tk.tm2score}" class="textInput required digits" maxlength="200" size="100"/>
	</div>
	
	<div class="unit">
		<label>总分数</label>
		<input type="text" id="tkscore" name="tkscore"  value="${tk.tkscore}" class="textInput required" maxlength="200" size="100"/>
	</div>
	
</div>
<div class="formBar">
	<ul>
		<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
		<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
	</ul>
</div>


</form>